package com.avic.rong.api;

import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;

/**
 * Creater: Created by wangyz on 2018/12/11.
 * Email: 936804097@qq.com
 */
public class CommiCertificateApi extends BaseApi<String> {


    private String tempUrl;
    private int orderId;
    private int userIdSign;

    public CommiCertificateApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
    }

    public void setArguments(String tempUrl, int orderId, int userIdSign){
        this.tempUrl = tempUrl;
        this.orderId = orderId;
        this.userIdSign = userIdSign;
    }



    @Override
    public Observable getObservable(retrofit2.Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
        return service.uploadVoucher(tempUrl, orderId, userIdSign);
    }

}





